package main

import (
	"fmt"
	"trietree/trie"
)

func main() {
	tree := trie.NewTrieTree()
	tree.Insert("site")
	res1 := tree.Search("aa")
	if res1 {
		fmt.Println("aa is existed!")
	}

	res2 := tree.Search("site")
	if res2 {
		fmt.Println("site is existed!")
	}
	tree.Insert("sites")
	cnt := tree.PassCnt("site")
	fmt.Printf("%s pass count: %d \n", "site", cnt)
	tree.Delete("site")
	fmt.Printf("site is existed: %t", tree.Search("site"))
}
